package com.bkhc.common.init;

import com.bkhc.common.annotation.ApiPackage;
import com.bkhc.common.entity.ApiPack;
import com.bkhc.common.service.ApiInfoService;
import com.bkhc.common.util.ReadAnnotationUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Set;

@Component
public class OperationInit {


    private final ApiInfoService apiInfoSerivce;
    @Autowired
    public OperationInit(ApiInfoService apiInfoSerivce){
        this.apiInfoSerivce = apiInfoSerivce;
        this.init();
    }

    public void init() {
            Set<ApiPack> packs = ReadAnnotationUtils.getClazzFromAnnotationOperation("com.bkhc.*.api", ApiPackage.class);
           // apiInfoSerivce.initApi(packs);

    }
}
